import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import home from '@/components/home'
import index from '@/components/main/index'
import details from '@/components/detail/details'
import admin from '@/components/admin/admin'
import user from '@/components/admin/user'
import assort from '@/components/admin/assortment'
import produ from '@/components/admin/production'
import life from '@/components/admin/life'
Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: home,
      children:[{
		      path: '/',
		      name: 'index',
		      component: index
	      },
	      {
			      path: '/index',
			      name: 'index',
			      component: index
	      },
	      {
			      path: '/details/:id',
			      name: 'detail',
			      component: details
	      }
      ]
    },  
    {
      path: '/admin',
      name: 'admin',
      component: admin,
      children:[{
		      path: '/admin',
		      name: 'user',
		      component: user,
	      },
	      {
			      path: '/assortment',
			      name: 'assort',
			      component: assort
	      },
	      {
			      path: '/production',
			      name: 'produ',
			      component: produ
	      },
	      {
			      path: '/life',
			      name: 'life',
			      component: life
	      }
      ]
    },  
  ]
})
